<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    <style>
      body {
        margin: 0;
        height: 100%;
      }
      #box {
        height: 120px;
        border: solid 1px red;
        width: 300px;
      }
    </style>
  </head>
  <body>
    <button onclick="handleClick()">高度增加</button>
    <div id="box"></div>
    <script>
      const handleClick = () => {
        $("#box").animate(
          {
            height: "+=30",
          },
          {
            complete: function () {
              $(this).after("<div>Animation complete.</div>");
            },
          }
        );
      };
    </script>
  </body>
</html>
